-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor relationships service and other changes #358
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ConfigurationService.setDefaultMarkingDefinitionsForObject - I believe this was the source of the circular dependencies issue. There are no more circuluar imports between the AttackObjectsService, RelationshipsService, IdentitiesService, UserAccountsService, and SystemsConfigurationService. - This method makes more sense in the systems-configuration-service module anyways, considering other similar functions are implemented there. - Had to rename the function because an identically named function that processes STIX IDs instead of STIX objects already exists in the system-configuration-service module. We may consolidate these in the future.
…enter-for-threat-informed-defense/attack-workbench-rest-api into refactor-relationships-service
seansica
changed the title
draft: Refactor relationships service
Draft: Refactor relationships service
Jan 7, 2025
- missing 'await' keyword in updateFull function - assigned variable 'relationship' should be 'relationships' in deleteById, causing no-unused-vars and no-undef
- lazy loading not essential now that circular dependencies are eliminated - call services from globals instead of static variables
This change consolidates object type declarations for Mongoose documents with 'type' properties.
Remove custom errors dictionary from AttackObjectsRepository (no longer in use).
The previous implementation was throwing a bunch of issues. It was easier to just start from 'develop' and and refactor it from scratch.
Identitied four methods implemented in subclasses that were being called from the parent class (BaseService) and migrated them to the parent class.
All 581 regression tests are now passing!
…thods Converting these two methods to static would require changes throughout the service layer. Rather than exhaust time refactoring them to call the method statically, we should investigate design changes that will organically resolve the issue.
seansica
changed the title
Draft: Refactor relationships service
Refactor relationships service and other changes
Jan 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.